<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<script>
    $(function () {
        $("#search-button").click(function () {
            var dishName = $("#search_input").val();
            try {
                load(1, dishName, null);
            }catch (e) {
                window.location.href = "${pageContext.request.contextPath}/order_dish.jsp?dishName="+dishName;
            }
        });
    })
</script>
<style>
    .search_box {
        margin: 25px auto;
        width: fit-content;
    }

    .search_input {
        float: left;
        width: 200px;
        height: 36px;
        border: 2px solid #ffc900;
        padding-left: 10px;
    }

    .search_input:focus {
        outline: none;
    }

    .search-button {
        float: left;
        width: 90px;
        height: 36px;
        background: #ffc900;
        text-align: center;
        line-height: 36px;
        color: #000;
        font-size: 18px;
    }
</style>

<div class="search_box clearfix">
    <input name="" id="search_input" type="text" placeholder="请输入菜品名称" class="search_input" autocomplete="off">
    <a href="javascript:;" class="search-button" id="search-button">搜索</a>
</div>

